{include file="header"}
<div class="x-body">
    <form class="layui-form">
        <input type="hidden" name="model" value="link">
        <xblock>
            <button class="layui-btn layui-btn-danger" lay-submit lay-filter="delete"><i class="layui-icon"></i>批量删除</button>  <a class="layui-btn" onclick="x_admin_show('添加','{:url('admin/com/link_add')}?wz={:get('wz')}')"><i class="layui-icon"></i>添加</a>
            <span class="x-right" style="line-height:40px">共有数据：{:fun_st('link',array('wz'=>get('wz')))} 条</span>
        </xblock>
        <div  style="overflow: auto;">
        <table class="layui-table" style="min-width: 1000px;">
            <colgroup>
                <col width="100">
                <col width="100">
                <col width="200">
                <col>
            </colgroup>
            <thead>
                <tr>
                    <th>
                        <input type="checkbox" name="checkAll" lay-filter="checkAll" title="全选">
                    </th>
                    <th>排序</th>
                    <th>名称</th>
                    <th>链接</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>{volist name=":fun_s('link',array('wz'=>get('wz')),'px desc',200,0)" id="vo"}
                <!--顶级-->
                <tr>
                    <td>
                        <input type="checkbox" name="ids[{$vo.id}]" lay-filter="checkOne" value="{$vo.id}" title="选择">
                    </td>
                    <td>{$vo.px}</td>
                    <td>{$vo.name}</td>
                    <td>{$vo.lianjie}</td>
                    <td>
                        <input type="checkbox" lay-skin="switch" url="{:url("admin/api/uindex")}?id={$vo.id}&model=link&or=open" lay-submit lay-filter="index" value="{$vo.id}" lay-text="显示|显示" {if condition="$vo['open'] eq 1"}checked{/if}>
                    </td>
                    <td class="td-manage"> <a class="layui-btn layui-btn-sm" onclick="x_admin_show('编辑分类','{:url('admin/com/link_add')}?id={$vo.id}&wz={:get('wz')}')"><i class="layui-icon"></i>编辑</a>
                        <a class="layui-btn layui-btn-sm layui-btn-danger del_t" url="{:url('admin/api/catedelete')}?model=link&id={$vo.id}" name="确定要删除这条记录吗？"><i class="layui-icon"></i>删除</a>
                    </td>
                </tr>{/volist}</tbody>
        </table>
        </div>
    </form>
    <div class="page">{:fun_s('link',array('wz'=>get('wz')),'px desc',200,0)->render()}</div>
</div>{include file="footer"}